﻿using System;
using System.Collections.Generic;
using System.Text;

namespace App.Utility.ComEntity
{ 
    /// <summary>
    /// 后台管理系统登录用户信息
    /// </summary>
    [Serializable]
    public class AdminLoginSession<TUser> : LoginSession<TUser>
        where TUser : class
    {
        public AdminLoginSession()
        {
            User = null;
            LstApi = new List<int>();
            LstRole = new List<int>();
            LstModule = new List<int>();
            LstPlatform = new List<int>();
            //Session_Key = string.Empty;
            //OpenId = string.Empty;
        }

        /// <summary>
        /// 角色信息
        /// </summary>
        public List<int> LstRole { get; set; }

        /// <summary>
        /// 模块信息
        /// </summary>
        public List<int> LstModule { get; set; }

        /// <summary>
        /// 接口信息
        /// </summary>
        public List<int> LstApi { get; set; }

        /// <summary>
        /// 平台信息
        /// </summary>
        public List<int> LstPlatform { get; set; }

        ///// <summary>
        ///// 微信Session_Key
        ///// </summary>
        //public string Session_Key { get; set; }
        ///// <summary>
        ///// 微信OpenId
        ///// </summary>
        //public string OpenId { get; set; }
    }

    /// <summary>
    /// App登录用户信息
    /// </summary>
    [Serializable]
    public class AppLoginSession<TUser> : LoginSession<TUser>
        where TUser : class
    {
        public AppLoginSession()
        {
            User = null;
            //LstApi = new List<int>();
            //LstRole = new List<int>();
            //LstModule = new List<int>();
            //LstPlatform = new List<int>();
            //Session_Key = string.Empty;
            //OpenId = string.Empty;
        }

        ///// <summary>
        ///// 角色信息
        ///// </summary>
        //public List<int> LstRole { get; set; }

        ///// <summary>
        ///// 模块信息
        ///// </summary>
        //public List<int> LstModule { get; set; }

        ///// <summary>
        ///// 接口信息
        ///// </summary>
        //public List<int> LstApi { get; set; }

        ///// <summary>
        ///// 平台信息
        ///// </summary>
        //public List<int> LstPlatform { get; set; }

        ///// <summary>
        ///// 微信Session_Key
        ///// </summary>
        //public string Session_Key { get; set; }
        ///// <summary>
        ///// 微信OpenId
        ///// </summary>
        //public string OpenId { get; set; }
    }

    public class LoginSession<TUser>
      where TUser : class
    {
        /// <summary>
        /// User信息
        /// </summary>
        public TUser User { get; set; }

        /// <summary>
        /// 登录token
        /// </summary>
        public string Token { get; set; }

        /// <summary>
        /// 刷新登录状态的密钥
        /// </summary>
        public string RefToken { get; set; }
    }

}
